package com.example.day13;

/**
 * @author Lenovo
 */
public class ExceptionDemo02 {
    public static void main(String[] args) {
        System.out.println("开始");
        method();
        System.out.println("结束");
    }
    public static void method(){
        try {
            System.out.println("try");
            int[] arr = new int[3];
            System.out.println(arr[3]);
        }catch (ArrayIndexOutOfBoundsException e){
            System.out.println("catch");
        }
        System.out.println("try...catch");
    }
}
